package com.csd.service.impl;

import com.csd.mapper.SysAdminMapper;
import com.csd.po.SysUser;
import com.csd.service.SysAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: CeSuDi_SSM
 * @description:
 * @author: xiaojiu
 * @create: 2020-12-23 17:37
 */
@Service
public class SysAdminServiceImpl implements SysAdminService {
    @Autowired(required = false)
    private SysAdminMapper sysAdminMapper;


    @Override
    public List<SysUser> findUsers() {
        List<SysUser> sysUsers = sysAdminMapper.findSysUser();

        return sysUsers;
    }

    @Override
    public void deleteSysUserById(int id) {

        sysAdminMapper.deleteSysUserById(id);
    }

    @Override
    public SysUser findUserById(int id) {

        return sysAdminMapper.findUserById(id);
    }

    @Override
    public void updateUser(SysUser sysUser) {
        sysAdminMapper.updateUser(sysUser);
    }


}
